import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
+import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
import St from 'gi://St';
}
_startStateMachine() {
- this._idleWatchId = this._idleMonitor.add_idle_watch(MIN_BREAK_LENGTH_SECONDS * 1000, this._onIdleWatch.bind(this));
+ this._idleWatchId = this._idleMonitor.add_idle_watch_full(
+ MIN_BREAK_LENGTH_SECONDS * 1000,
+ this._onIdleWatch.bind(this),
+ Meta.IdleMonitorWatchFlags.UNINHIBITABLE | Meta.IdleMonitorWatchFlags.START_NOW);
this._state = BreakState.ACTIVE;
this._currentBreakType = null;
// simulated clock and event queue.
get mockIdleMonitor() {
return {
- add_idle_watch: (waitMsec, callback) => {
+ add_idle_watch_full: (waitMsec, callback, _flags) => {
console.assert(this._idleWatch === null);
this._idleWatch = {
waitMsec,